// 创建公共组件
import Skeleton from './Skeleton/index.vue'
import Slider from './Slider'
import More from './More'
import Bread from './Bread/index.vue'
import Breaditem from './Bread/item.vue'
import City from './City'
import Sku from './Sku'
import Numbox from './Numbox'
import CheckBox from './CheckBox'
// 按钮
import Button from './Button'
const cps = [CheckBox, Button, Numbox, Skeleton, Slider, More, Bread, Breaditem, City, Sku]
export default {
  /**
   * vue2:参数是Vue构造函数  作用：注册全局组件、指令、过滤器、全局混入
   * vue3:app  根实例 作用：注册全局组件、指令、混入
   */
  install (app) {
    // app.component('Skeleton', Skeleton)
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
